package com.itheima.youdianda.common;


public class BaseContext {
    private static ThreadLocal<Long> threadLocal = new ThreadLocal<>();

    /**
     * 设置id
     * @param id
     */
    public static void setCurrentId(Long id){
        threadLocal.set(id);
    }

    /**
     * 获取id
	 * @return
	 */
    public static Long getCurrentId(){
        return threadLocal.get();
    }
}
